package com.techsoul.module.pms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.techsoul.module.pms.pojo.entity.TWhWarehouseCustomerMaterial;
import com.techsoul.module.pms.pojo.param.TWhWarehouseCustomerMaterialSearchParam;
import com.techsoul.module.pms.pojo.vo.TWhWarehouseCustomerMaterialVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 共享仓储客户物料Mapper接口
 * 
 * @author liuen
 * @date 2022-12-30
 */
public interface TWhWarehouseCustomerMaterialMapper extends BaseMapper<TWhWarehouseCustomerMaterial> {

    /**
     * 详情
     * @param id
     * @return
     */
    TWhWarehouseCustomerMaterialVo findById(String id);
    TWhWarehouseCustomerMaterial findBySkuCode(@Param("skuCode") String skuCode);

    TWhWarehouseCustomerMaterial findByMaterialNoAndCustomerNo(@Param("materialNo") String materialNo,@Param("customerNo") String customerNo);
    TWhWarehouseCustomerMaterial findByCustNameAndSkuCode(@Param("customerName") String customerName,@Param("skuCode") String skuCode);
    /**
     * 列表
     * @param params
     * @return
     */
    List<TWhWarehouseCustomerMaterialVo> findAll(@Param("params") TWhWarehouseCustomerMaterialSearchParam params);
    TWhWarehouseCustomerMaterialVo findByMaterialNoAndVehicleModel(@Param("materialNo") String materialNo,@Param("vehicleModel") String vehicleModel);
    /**
     * 分页
     * @param page
     * @param params
     * @return
     */
    IPage<TWhWarehouseCustomerMaterialVo> findAll(Page page, @Param("params") TWhWarehouseCustomerMaterialSearchParam params);

    List<TWhWarehouseCustomerMaterialVo>  findVehicleBrand(@Param("params") TWhWarehouseCustomerMaterialSearchParam params);

    List<TWhWarehouseCustomerMaterialVo>  findVehicleModel(@Param("params") TWhWarehouseCustomerMaterialSearchParam params);
}
